#ifndef     __PROTO_H
#define     __PROTO_H

#include <stdint.h>

namespace utils::proto {

constexpr uint16_t SalveFlag = 0x8000;
constexpr uint16_t NotifyFlag = 0x4000;

constexpr uint16_t Head = 0xE11E;
constexpr uint8_t End = 0xEF;

constexpr uint16_t Ack = 0x00;
constexpr uint16_t Except = 0x01;
constexpr uint16_t OTAStart = 0x02;
constexpr uint16_t OTATranslate = 0x03;
constexpr uint16_t OTAComplete = 0x04;
constexpr uint16_t StatusUpload = 0x05;
constexpr uint16_t TestFridge = 0x06;
constexpr uint16_t SetFridgeArg = 0x07;
constexpr uint16_t TestTube = 0x08;
constexpr uint16_t SetTubeArg = 0x09;
constexpr uint16_t TestCompr = 0x0A;
constexpr uint16_t TestArm = 0x0B;
constexpr uint16_t ArmCtrl = 0x0C;
constexpr uint16_t CargoDelivery = 0x0D;
constexpr uint16_t AutoSetCargo = 0x0E;
constexpr uint16_t SetCargo = 0x0F;
constexpr uint16_t QueryCargo = 0x10;
constexpr uint16_t QueryAllCargo = 0x11;
constexpr uint16_t Reset = 0x12;
constexpr uint16_t Preprocess = 0x13;
constexpr uint16_t ArmAdj = 0x14;
constexpr uint16_t Begin = 0x15;
constexpr uint16_t Run = 0x16;
constexpr uint16_t Finish = 0x17;
constexpr uint16_t Action = 0x18; // 各种动作结果
constexpr uint16_t DelCargo = 0x19;
constexpr uint16_t TestCargo = 0x1A;
constexpr uint16_t AutoSetPick = 0x1B;
constexpr uint16_t SetPick = 0x1C;
constexpr uint16_t GetParam = 0x1D;
constexpr uint16_t ELock = 0x1E;
constexpr uint16_t ReadMotorDriver = 0x1F;
constexpr uint16_t WriteMotorDriver = 0x20;
constexpr uint16_t GetDrvStatus = 0x21;
constexpr uint16_t ClearDrvFault = 0x22;

}

namespace utils::prog {

constexpr uint8_t STEP1 = 0x00; // 冰箱门打开
constexpr uint8_t STEP2 = 0x01; // 升降复位
constexpr uint8_t STEP3 = 0x02; // 机械臂1复位
constexpr uint8_t STEP4 = 0x03; // 机械臂2到目标位置
constexpr uint8_t STEP5 = 0x04; // 机械臂1到目标位置
constexpr uint8_t STEP6 = 0x05; // 升降下降1
constexpr uint8_t STEP7 = 0x06; // 开始吸取
constexpr uint8_t STEP8 = 0x07; // 升降复位2
constexpr uint8_t STEP9 = 0x08; // 机械臂1复位2
constexpr uint8_t STEP10 = 0x09; // 机械臂2到出货口
constexpr uint8_t STEP11 = 0x0A; // 机械臂1到出货口
constexpr uint8_t STEP12 = 0x0B; // 升降下降到出货口
constexpr uint8_t STEP13 = 0x0C; // 升降复位
constexpr uint8_t STEP14 = 0x0D; // 冰箱关闭
constexpr uint8_t STEP15 = 0x0E; // 机械臂1复位3
constexpr uint8_t STEP16 = 0x0F; // 机械臂2复位


}


#endif
